from django.contrib import admin
from .models import Announcement

# Register your models here.

@admin.register(Announcement)
class AnnouncementAdmin(admin.ModelAdmin):
    list_display = ['id', 'title', 'user', 'time']
    list_filter = ['time', 'user']
    search_fields = ['title', 'content']
    list_per_page = 20
    ordering = ['-time']
    readonly_fields = ['time']
